x86/hpet: Fix return value of hpet_setup()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 21 Jan 2021 15:17:21 +0000 (16:17 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 21 Jan 2021 15:17:21 +0000 (16:17 +0100)
commita514c5ef5bda0da4020b22037d921b845a151116
treee0acd4bc7b1a257eb98ec915026007eaa9bcd149
parent1b09f3dcd4708309a21b4b088cedea86417dcd7b
x86/hpet: Fix return value of hpet_setup()

hpet_setup() is idempotent if the rate has already been calculated, and
returns the cached value.  However, this only works correctly when the return
statements are identical.

Use a sensibly named local variable, rather than a dead one with a bad name.

Fixes: a60bb68219 ("x86/time: reduce rounding errors in calculations")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
master commit: 83736c567d6b64dbce98f251ca72e7870f556421
master date: 2020-12-31 16:19:00 +0000
xen/arch/x86/hpet.c